home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / cat3 / OwnSelect.3 < prev    next >
Text File  |  1994-09-20  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4. Tk_OwnSelection(3)    Tk Library Procedures
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      Tk_OwnSelection - make a window the  owner  of  the  primary
  12.      selection
  13.  
  14. SYNOPSIS
  15.      #include <tk.h>
  16.  
  17.      Tk_OwnSelection(_t_k_w_i_n, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
  18.  
  19. ARGUMENTS
  20.      Tk_Window        _t_k_w_i_n        (in)      Window  that  is  to
  21.                                              become new selection
  22.                                              owner.
  23.  
  24.      Tk_LostSelProc   *_p_r_o_c        (in)      Procedure to  invoke
  25.                                              when   _t_k_w_i_n   loses
  26.                                              selection  ownership
  27.                                              later.
  28.  
  29.      ClientData       _c_l_i_e_n_t_D_a_t_a   (in)      Arbitrary   one-word
  30.                                              value   to  pass  to
  31.                                              _p_r_o_c.
  32. _________________________________________________________________
  33.  
  34.  
  35. DESCRIPTION
  36.      Tk_OwnSelection arranges for _t_k_w_i_n to become the  new  owner
  37.      of the primary selection.  After this call completes, future
  38.      requests for the selection  will  be  directed  to  handlers
  39.      created  for  _t_k_w_i_n  using  Tk_CreateSelHandler.  When _t_k_w_i_n
  40.      eventually loses  the  selection  ownership,  _p_r_o_c  will  be
  41.      invoked  so  that  the  window  can clean itself up (e.g. by
  42.      unhighlighting the selection).  _P_r_o_c should  have  arguments
  43.      and result that match the type Tk_LostSelProc:
  44.           typedef void Tk_LostSelProc(ClientData _c_l_i_e_n_t_D_a_t_a);
  45.      The _c_l_i_e_n_t_D_a_t_a parameter to _p_r_o_c is a copy of the _c_l_i_e_n_t_D_a_t_a
  46.      argument  given to Tk_OwnSelection, and is usually a pointer
  47.      to a data structure containing application-specific informa-
  48.      tion about _t_k_w_i_n.
  49.  
  50.      Once a window has become selection  owner,  it  will  remain
  51.      owner until either the window is deleted or until some other
  52.      window claims ownership.  There is no way for  a  window  to
  53.      disavow ownership of the selection once it has received it.
  54.  
  55.  
  56. KEYWORDS
  57.      own, selection owner
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Tk                                                              1
  64.  
  65.  
  66.  
  67.